#ifndef USBSTICK_H
#define USBSTICK_H


class USBStick {
public:
    USBStick() {};

    void begin();

    void stop();

    int isConnected();

    int loop();

#ifdef USE_FATFS

    int open_file(const char *filename);

    int write(const char *wtext, int len);

    int close();

    int open_file_rdonly(const char *filename);

    int read(char *rtext, int len);

    int stat(const char *filename);

    bool exists(const char *filename);

#endif
    int fsize{};

    int ls(char *path);

    int mount();

};

extern USBStick usb;

extern "C" {
void usb_ready();
void usb_disconnect();
}
#endif
